from typing import Any, AsyncGenerator

from core.config import settings
from databases import Database

database = Database(settings.MYSQL_URI)


async def get_db() -> AsyncGenerator[Database, Any]:
    yield database
